using GTA;
using GTA.Native;

namespace CustomPeds;

public static class SkinHelper
{
	public static void SetPedComponentVariation(Ped ped, int componentId, int drawableId, int textureId, int paletteId)
	{
		Function.Call<int>(Hash._0x262B14F48D29DE80, ped, componentId, drawableId, textureId, paletteId);
	}

	public static int GetPedDrawableVariation(Ped ped, int componentId)
	{
		return Function.Call<int>(Hash._0x67F3780DD425D4FC, ped, componentId);
	}

	public static int GetPedTextureVariation(Ped ped, int componentId)
	{
		return Function.Call<int>(Hash._0x04A355E041E004E6, ped, componentId);
	}

	public static int GetPedPaletteVariation(Ped ped, int componentId)
	{
		return Function.Call<int>(Hash._0xE3DD5F2A84B42281, ped, componentId);
	}

	public static int GetPedDrawableNumber(Ped ped, int componentId)
	{
		return Function.Call<int>(Hash._0x27561561732A7842, ped, componentId);
	}

	public static int GetPedTextureNumber(Ped ped, int componentId, int drawableId)
	{
		return Function.Call<int>(Hash._0x8F7156A3142A6BAD, ped, componentId, drawableId);
	}

	public static void SetPedPropIndex(Ped ped, int propId, int drawableId, int textureId, bool attach)
	{
		Function.Call<int>(Hash._0x93376B65A266EB5F, ped, propId, drawableId, textureId, attach);
	}

	public static int GetPedPropIndex(Ped ped, int propId)
	{
		return Function.Call<int>(Hash._0x898CC20EA75BACD8, ped, propId);
	}

	public static int GetPedPropTextureIndex(Ped ped, int propId)
	{
		return Function.Call<int>(Hash._0xE131A28626F81AB2, ped, propId);
	}

	public static int GetPedPropDrawableNumber(Ped ped, int propId)
	{
		return Function.Call<int>(Hash._0x5FAF9754E789FB47, ped, propId);
	}

	public static int GetPedPropTextureNumber(Ped ped, int propId, int drawableId)
	{
		return Function.Call<int>(Hash._0xA6E7F1CEB523E171, ped, propId, drawableId);
	}

	public static void ClearPedProp(Ped ped, int propId)
	{
		Function.Call(Hash._0x0943E5B8E078E76E, ped, propId);
	}

	public static void ClearAllPedProps(Ped ped)
	{
		Function.Call(Hash._0xCD8A7537A9B52F06, ped);
	}

	public static void SetPedHeadBlendData(Ped ped, int shapeFirstID, int shapeSecondID, int shapeThirdID, int skinFirstID, int skinSecondID, int skinThirdID, float shapeMix, float skinMix, float thirdMix, bool isParent)
	{
		Function.Call(Hash._0x9414E18B9434C2FE, ped, shapeFirstID, shapeSecondID, shapeThirdID, skinFirstID, skinSecondID, skinThirdID, shapeMix, skinMix, thirdMix, isParent);
	}

	public static void UpdatePedHeadBlendData(Ped ped, float shapeMix, float skinMix, float thirdMix)
	{
		Function.Call(Hash._0x723538F61C647C5A, ped, shapeMix, skinMix, thirdMix);
	}

	public static int GetFirstParentIdForPedType(int type)
	{
		return Function.Call<int>(Hash._0x68D353AB88B97E0C, type);
	}

	public static int GetNumParentPedsOfType(int type)
	{
		return Function.Call<int>(Hash._0x5EF37013A6539C9D, type);
	}

	public static bool HasPedHeadBlend(Ped ped)
	{
		return Function.Call<bool>(Hash._0x654CD0A825161131, ped);
	}

	public static void SetPedFaceFeature(Ped ped, int index, float scale)
	{
		Function.Call(Hash._0x71A5C1DBA060049E, ped, index, scale);
	}

	public static void SetPedEyeColor(Ped ped, int colorID)
	{
		Function.Call(Hash._0x50B56988B170AFDF, ped, colorID);
	}

	public static void SetPedHairColor(Ped ped, int colorID, int highlightColorID)
	{
		Function.Call(Hash._0x4CFFC65454C93A49, ped, colorID, highlightColorID);
	}

	public static int GetNumHairColors(Ped ped)
	{
		return Function.Call<int>(Hash._0xE5C0CF872C2AD150, ped);
	}

	public static int GetNumMakeupColors(Ped ped)
	{
		return Function.Call<int>(Hash._0xD1F7CA1535D22818, ped);
	}

	public static void SetPedHeadOverlayValue(Ped ped, int overlayID, int overlayValue, float opacity)
	{
		Function.Call(Hash._0x48F44967FA05CC1E, ped, overlayID, overlayValue, opacity);
	}

	public static void SetPedHeadOverlayColor(Ped ped, int overlayID, int colorType, int firstColorID, int secondColorID)
	{
		Function.Call(Hash._0x497BF74A7B9CB952, ped, overlayID, colorType, firstColorID, secondColorID);
	}

	public static int GetPedHeadOverlayValue(Ped ped, int overlayID)
	{
		return Function.Call<int>(Hash._0xA60EF3B6461A4D43, ped, overlayID);
	}

	public static int GetNumHeadOverlayValue(int overlayID)
	{
		return Function.Call<int>(Hash._0xCF1CE768BB43480E, overlayID);
	}

	public static void SetPedDecoration(Ped ped, string collection, string overlay)
	{
		Function.Call(Hash._0x5F5D1665E352A839, ped, Game.GenerateHash(collection), Game.GenerateHash(overlay));
	}

	public static void ClearPedDecorations(Ped ped)
	{
		Function.Call(Hash._0x0E5173C163976E38, ped);
	}
}
